const crypto = require('crypto')

let id = null

module.exports = {
  genId () {
    if (!id) {
      id = crypto.randomBytes(20)
      const prefix = '-ST9527-'
      Buffer.from(prefix).copy(id, 0)
    }
    return id
  }
}